<?php
if(!isset($entites))
	exit();
	
/**
 * Collones
 */
echo '<p>Liste des entités historiques dans la base :</p>';
echo '<table border=1>';
echo '<tr>';
	echo '<th>ID</th>';
	echo '<th>Type</th>';
	echo '<th>Nom</th>';
	echo '<th>Description</th>';
	echo '<th>Wiki</th>';
	echo '<th>Profondeur</th>';
	echo '<th>Creation</th>';
	echo '<th>Dissolution</th>';
echo '</tr>';

/**
 * Lignes
 */
foreach($entites as $e) {
	echo '<tr>';
		echo '<td>' . $e->get_identite() . '</td>';
		echo '<td>' . $e->get_typeentite() . '</td>';
		echo '<td>' . $e->get_nomentite() . '</td>';
		echo '<td>' . $e->get_descriptifentite() . '</td>';
		echo '<td><a href="' . $e->get_wikientite() . '">'. $e->get_wikientite(). '</a></td>';
		echo '<td>' . $e->get_profondeur() . '</td>';
		echo '<td>' . $e->get_creation()->get_date() . '</td>';
		echo '<td>' . $e->get_dissolution()->get_date() . '</td>';
		echo '<td>
				<form action="" method="get">
				<input type="hidden" name="section" value="entite_historique">
				<input type="hidden" name="action" value="show">
				<input type="hidden" name="id" value="' . $e->get_identite() . '">
				<button type="submit">+</button>
			</form></td>';
	echo '</tr>';
}
echo '</table>';
?>
